home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / AIncludes / TimeObjects.a < prev    next >
Text File  |  1996-05-01  |  21KB  |  719 lines

  1. ;
  2. ;    File:        TimeObjects.a
  3. ;
  4. ;    Contains:    International Time Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 8
  7. ;                Release:    Universal Interfaces 3.0d3 on Copland DR1
  8. ;
  9. ;    Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10. ;
  11. ;    Bugs?:        If you find a problem with this file, send the file and version
  12. ;                information (from above) and the problem description to:
  13. ;
  14. ;                    Internet:    apple.bugs@applelink.apple.com
  15. ;                    AppleLink:    APPLE.BUGS
  16. ;
  17. ;
  18.     IF &TYPE('__TIMEOBJECTS__') = 'UNDEFINED' THEN
  19. __TIMEOBJECTS__ SET 1
  20.  
  21.     IF &TYPE('__CONDITIONALMACROS__') = 'UNDEFINED' THEN
  22.     include 'ConditionalMacros.a'
  23.     ENDIF
  24.     IF &TYPE('__KERNEL__') = 'UNDEFINED' THEN
  25.     include 'Kernel.a'
  26.     ENDIF
  27.     IF &TYPE('__LOCALEOBJECTS__') = 'UNDEFINED' THEN
  28.     include 'LocaleObjects.a'
  29.     ENDIF
  30.     IF &TYPE('__OSUTILS__') = 'UNDEFINED' THEN
  31.     include 'OSUtils.a'
  32.     ENDIF
  33.     IF &TYPE('__TEXTOBJECTS__') = 'UNDEFINED' THEN
  34.     include 'TextObjects.a'
  35.     ENDIF
  36.     IF &TYPE('__TIMING__') = 'UNDEFINED' THEN
  37.     include 'Timing.a'
  38.     ENDIF
  39.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  40.     include 'Types.a'
  41.     ENDIF
  42. ;
  43. ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  44. ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  45. ; ++                                                                                ++
  46. ; ++                        Type definitions for Modern APIs                        ++
  47. ; ++                                                                                ++
  48. ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  49. ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  50. ;
  51.     IF FOR_SYSTEM8_PREEMPTIVE THEN
  52. ;  Precision of TimeObject 
  53. ; typedef UInt8                         TimeObjectPrecision
  54.  
  55.  
  56. kTONanosecondsPrecision            EQU        $00
  57. kTOMicrosecondsPrecision        EQU        $01
  58. kTOMillisecondsPrecision        EQU        $02
  59. kTOSecondsPrecision                EQU        $03
  60. kTOMinutesPrecision                EQU        $04
  61. kTOHoursPrecision                EQU        $05
  62. kTODaysPrecision                EQU        $06
  63. ;  Maximun Time Object Precision 
  64.  
  65. kTOMaxPrecision                    EQU        $06
  66. ; typedef UInt32                         TimeObjectNotificationRef
  67.  
  68. MachineLocationRecord    RECORD 0
  69. longitude                 ds.l    1                ; offset: $0 (0)
  70. latitude                 ds.l    1                ; offset: $4 (4)
  71. daylightSavingsDelta     ds        TimeObjectInterval ; offset: $8 (8)
  72. utcDelta                 ds        TimeObjectInterval ; offset: $18 (24)
  73. sizeof                     EQU *                    ; size:   $28 (40)
  74.                         ENDR
  75. ; typedef struct MachineLocationRecord * MachineLocationRecordPtr
  76.  
  77. ; typedef const struct MachineLocationRecord * ConstMachineLocationRecordPtr
  78.  
  79. UTCTimeRecord            RECORD 0
  80. era                         ds.w    1                ; offset: $0 (0)        ;  [0 = B.C.E., 1 = C.E. ]
  81. year                     ds.w    1                ; offset: $2 (2)        ;  [0, 65535]
  82. month                     ds.w    1                ; offset: $4 (4)        ;  [0,12]
  83. day                         ds.w    1                ; offset: $6 (6)        ;  [0,32]
  84. hour                     ds.w    1                ; offset: $8 (8)        ;  [0,23]
  85. minute                     ds.w    1                ; offset: $A (10)        ;  [0,60]
  86. seconds                     ds.w    1                ; offset: $C (12)        ;  [0,60]
  87. milliseconds             ds.w    1                ; offset: $E (14)        ;  [0,1e3)
  88. microseconds             ds.l    1                ; offset: $10 (16)        ;  [0,1e6)
  89. nanoseconds                 ds.l    1                ; offset: $14 (20)        ;  [0,1e9)
  90. precision                 ds.b    1                ; offset: $18 (24)
  91.                          ORG 26
  92. sizeof                     EQU *                    ; size:   $1A (26)
  93.                         ENDR
  94. ; typedef struct UTCTimeRecord *        UTCTimeRecordPtr
  95.  
  96. ; typedef const struct UTCTimeRecord *    ConstUTCTimeRecordPtr
  97.  
  98. UTCTimeIntervalRecord    RECORD 0
  99. day                         ds.l    1                ; offset: $0 (0)
  100. hour                     ds.l    1                ; offset: $4 (4)
  101. minute                     ds.l    1                ; offset: $8 (8)
  102. seconds                     ds.l    1                ; offset: $C (12)
  103. milliseconds             ds.l    1                ; offset: $10 (16)
  104. microseconds             ds.l    1                ; offset: $14 (20)
  105. nanoseconds                 ds.l    1                ; offset: $18 (24)
  106. precision                 ds.b    1                ; offset: $1C (28)
  107.                          ORG 30
  108. sizeof                     EQU *                    ; size:   $1E (30)
  109.                         ENDR
  110. ; typedef struct UTCTimeIntervalRecord * UTCTimeIntervalRecordPtr
  111.  
  112. ; typedef const struct UTCTimeIntervalRecord * ConstUTCTimeIntervalRecordPtr
  113.  
  114. ; typedef UInt32                         TimeObjectConversionType
  115.  
  116.  
  117. kUseRomanNumbers                EQU        0
  118. kUseNativeNumbers                EQU        1
  119. ; typedef LocaleObjectRef                 CalendarObjectRef
  120.  
  121. ; typedef TextObject                     TimeObjectFormatString
  122.  
  123. ;  DateTimeFormat Types: 
  124. ; typedef UInt32                         FormatStringRef
  125.  
  126.  
  127. kPreferredDateTimeFormat        EQU        0
  128. kShortDateTimeFormat            EQU        1
  129. kLongDateTimeFormat                EQU        2
  130. kShortTimeFormat                EQU        3
  131. kLongTimeFormat                    EQU        4
  132.     ENDIF
  133. ;
  134. ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  135. ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  136. ; ++                                                                                ++
  137. ; ++                        Type definitions for Legacy APIs                        ++
  138. ; ++                                                                                ++
  139. ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  140. ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  141. ;
  142.     IF FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED THEN
  143. ;
  144. ;
  145. ;    Here are the current routine names and the translations to the older forms.
  146. ;    Please use the newer forms in all new code and migrate the older names out of existing
  147. ;    code as maintainance permits.
  148. ;    
  149. ;    New Name                    Old Name(s)
  150. ;    
  151. ;    DateString                    IUDatePString IUDateString 
  152. ;    InitDateCache
  153. ;    LongDateString                IULDateString
  154. ;    LongTimeString                IULTimeString
  155. ;    StringToDate                String2Date
  156. ;    StringToTime                                
  157. ;    TimeString                    IUTimeString IUTimePString
  158. ;
  159.  
  160. shortDate                        EQU        0
  161. longDate                        EQU        1
  162. abbrevDate                        EQU        2
  163. ; typedef SInt8                         DateForm
  164.  
  165.  
  166.                                                             ; StringToDate status values 
  167. fatalDateTime                    EQU        $8000                ; StringToDate and String2Time mask to a fatal error 
  168. longDateFound                    EQU        1                    ; StringToDate mask to long date found 
  169. leftOverChars                    EQU        2                    ; StringToDate & Time mask to warn of left over characters 
  170. sepNotIntlSep                    EQU        4                    ; StringToDate & Time mask to warn of non-standard separators 
  171. fieldOrderNotIntl                EQU        8                    ; StringToDate & Time mask to warn of non-standard field order 
  172. extraneousStrings                EQU        16                    ; StringToDate & Time mask to warn of unparsable strings in text 
  173. tooManySeps                        EQU        32                    ; StringToDate & Time mask to warn of too many separators 
  174. sepNotConsistent                EQU        64                    ; StringToDate & Time mask to warn of inconsistent separators 
  175. tokenErr                        EQU        $8100                ; StringToDate & Time mask for 'tokenizer err encountered' 
  176. cantReadUtilities                EQU        $8200
  177. dateTimeNotFound                EQU        $8400
  178. dateTimeInvalid                    EQU        $8800
  179. ; typedef short                         StringToDateStatus
  180.  
  181. ; typedef short                         String2DateStatus
  182.  
  183. DateCacheRecord            RECORD 0
  184. hidden                     ds.w    256                ; offset: $0 (0)        ;  only for temporary use 
  185. sizeof                     EQU *                    ; size:   $200 (512)
  186.                         ENDR
  187. ; typedef struct DateCacheRecord *        DateCachePtr
  188.  
  189.     ENDIF
  190. ;
  191. ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  192. ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  193. ; ++                                                                                ++
  194. ; ++                                Modern API Definitions                            ++
  195. ; ++                                                                                ++
  196. ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  197. ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  198. ;
  199.     IF FOR_SYSTEM8_PREEMPTIVE THEN
  200. ;
  201. ; *********************************************************
  202. ; *
  203. ; * TimeObject Constructors
  204. ; *
  205. ; *********************************************************
  206. ;
  207. ;
  208. ; extern OSStatus CreateTimeObject(TimeObjectPtr timeObject, ConstUTCTimeRecordPtr utcTime)
  209. ;
  210.     IF GENERATINGCFM THEN
  211.         IMPORT_CFM_FUNCTION CreateTimeObject
  212.     ENDIF
  213.  
  214. ;
  215. ; extern OSStatus CreateTimeObjectInterval(TimeObjectIntervalPtr timeObjectInterval, ConstUTCTimeIntervalRecordPtr utcTimeInterval)
  216. ;
  217.     IF GENERATINGCFM THEN
  218.         IMPORT_CFM_FUNCTION CreateTimeObjectInterval
  219.     ENDIF
  220.  
  221. ;
  222. ; *********************************************************
  223. ; *
  224. ; * Getter and Setter Functions for TimeObjects
  225. ; *
  226. ; *********************************************************
  227. ;
  228. ;
  229. ; extern OSStatus GetCurrentTime(TimeObjectPtr timeObj)
  230. ;
  231.     IF GENERATINGCFM THEN
  232.         IMPORT_CFM_FUNCTION GetCurrentTime
  233.     ENDIF
  234.  
  235. ;
  236. ; extern OSStatus SetCurrentTime(ConstTimeObjectPtr timeObj)
  237. ;
  238.     IF GENERATINGCFM THEN
  239.         IMPORT_CFM_FUNCTION SetCurrentTime
  240.     ENDIF
  241.  
  242. ;
  243. ; *********************************************************
  244. ; *
  245. ; * Getter and Setter Functions for Machine Location
  246. ; *
  247. ; *********************************************************
  248. ;
  249. ;
  250. ; extern OSStatus GetMachineLocation(MachineLocationRecordPtr machineLocation)
  251. ;
  252.     IF GENERATINGCFM THEN
  253.         IMPORT_CFM_FUNCTION GetMachineLocation
  254.     ENDIF
  255.  
  256. ;
  257. ; extern OSStatus SetMachineLocation(ConstMachineLocationRecordPtr machineLocation)
  258. ;
  259.     IF GENERATINGCFM THEN
  260.         IMPORT_CFM_FUNCTION SetMachineLocation
  261.     ENDIF
  262.  
  263. ;
  264. ; *********************************************************
  265. ; *
  266. ; * Getter and Setter Functions for TimeObjects Precision
  267. ; *
  268. ; *********************************************************
  269. ;
  270. ;
  271. ; extern OSStatus GetTimeObjectPrecision(ConstTimeObjectPtr timeObj, TimeObjectPrecision *precision)
  272. ;
  273.     IF GENERATINGCFM THEN
  274.         IMPORT_CFM_FUNCTION GetTimeObjectPrecision
  275.     ENDIF
  276.  
  277. ;
  278. ; extern OSStatus SetTimeObjectPrecision(TimeObjectPtr timeObj, TimeObjectPrecision precision)
  279. ;
  280.     IF GENERATINGCFM THEN
  281.         IMPORT_CFM_FUNCTION SetTimeObjectPrecision
  282.     ENDIF
  283.  
  284. ;
  285. ; extern OSStatus GetTimeObjectIntervalPrecision(ConstTimeObjectIntervalPtr timeObj, TimeObjectPrecision *precision)
  286. ;
  287.     IF GENERATINGCFM THEN
  288.         IMPORT_CFM_FUNCTION GetTimeObjectIntervalPrecision
  289.     ENDIF
  290.  
  291. ;
  292. ; extern OSStatus SetTimeObjectIntervalPrecision(TimeObjectIntervalPtr timeObj, TimeObjectPrecision precision)
  293. ;
  294.     IF GENERATINGCFM THEN
  295.         IMPORT_CFM_FUNCTION SetTimeObjectIntervalPrecision
  296.     ENDIF
  297.  
  298. ;
  299. ; *********************************************************
  300. ; *
  301. ; * Timers
  302. ; *
  303. ; *********************************************************
  304. ;
  305. ;
  306. ; extern OSStatus CreateTimeObjectNotifier(ConstTimeObjectPtr timeObject, KernelNotification *notifier, TimeObjectNotificationRef *notificationRef)
  307. ;
  308.     IF GENERATINGCFM THEN
  309.         IMPORT_CFM_FUNCTION CreateTimeObjectNotifier
  310.     ENDIF
  311.  
  312. ;
  313. ; extern OSStatus CancelTimeObjectNotifier(TimeObjectNotificationRef notificationRef)
  314. ;
  315.     IF GENERATINGCFM THEN
  316.         IMPORT_CFM_FUNCTION CancelTimeObjectNotifier
  317.     ENDIF
  318.  
  319. ;
  320. ; *********************************************************
  321. ; *
  322. ; * Manipulation and Comparison functions for TimeObjects
  323. ; *
  324. ; *********************************************************
  325. ;
  326. ;
  327. ; extern OSStatus AddToFixedTimeObject(ConstTimeObjectPtr fixedTimeObj, ConstTimeObjectIntervalPtr offsetTimeObj, TimeObjectPtr result)
  328. ;
  329.     IF GENERATINGCFM THEN
  330.         IMPORT_CFM_FUNCTION AddToFixedTimeObject
  331.     ENDIF
  332.  
  333. ;
  334. ; extern OSStatus AddTimeObjectIntervals(ConstTimeObjectIntervalPtr timeObj1, ConstTimeObjectIntervalPtr timeObj2, TimeObjectIntervalPtr result)
  335. ;
  336.     IF GENERATINGCFM THEN
  337.         IMPORT_CFM_FUNCTION AddTimeObjectIntervals
  338.     ENDIF
  339.  
  340. ;
  341. ; extern OSStatus SubtractFromFixedTimeObject(ConstTimeObjectPtr fixedTimeObj, ConstTimeObjectIntervalPtr offsetTimeObj, TimeObjectPtr result)
  342. ;
  343.     IF GENERATINGCFM THEN
  344.         IMPORT_CFM_FUNCTION SubtractFromFixedTimeObject
  345.     ENDIF
  346.  
  347. ;
  348. ; extern OSStatus SubtractTimeObjectIntervals(ConstTimeObjectIntervalPtr timeObj1, ConstTimeObjectIntervalPtr timeObj2, TimeObjectIntervalPtr result)
  349. ;
  350.     IF GENERATINGCFM THEN
  351.         IMPORT_CFM_FUNCTION SubtractTimeObjectIntervals
  352.     ENDIF
  353.  
  354. ;
  355. ; extern OSStatus SubtractFixedTimeObjects(ConstTimeObjectPtr timeObj1, ConstTimeObjectPtr timeObj2, TimeObjectIntervalPtr result)
  356. ;
  357.     IF GENERATINGCFM THEN
  358.         IMPORT_CFM_FUNCTION SubtractFixedTimeObjects
  359.     ENDIF
  360.  
  361. ;
  362. ; extern OSStatus CompareFixedTimeObjects(ConstTimeObjectPtr timeObj1, ConstTimeObjectPtr timeObj2, ConstTimeObjectIntervalPtr precision, SInt32 *result)
  363. ;
  364.     IF GENERATINGCFM THEN
  365.         IMPORT_CFM_FUNCTION CompareFixedTimeObjects
  366.     ENDIF
  367.  
  368. ;
  369. ; extern OSStatus CompareTimeObjectIntervals(ConstTimeObjectIntervalPtr timeObj1, ConstTimeObjectIntervalPtr timeObj2, ConstTimeObjectIntervalPtr precision, SInt32 *result)
  370. ;
  371.     IF GENERATINGCFM THEN
  372.         IMPORT_CFM_FUNCTION CompareTimeObjectIntervals
  373.     ENDIF
  374.  
  375. ;
  376. ; *********************************************************
  377. ; *
  378. ; * TimeObjects to Seconds from 1/1/04 conversion functions
  379. ; *
  380. ; *********************************************************
  381. ;
  382. ;
  383. ; extern OSStatus ConvertSecondsToTimeObject(UInt32 seconds, TimeObjectPtr convertedTimeObj)
  384. ;
  385.     IF GENERATINGCFM THEN
  386.         IMPORT_CFM_FUNCTION ConvertSecondsToTimeObject
  387.     ENDIF
  388.  
  389. ;
  390. ; extern OSStatus ConvertTimeObjectToSeconds(ConstTimeObjectPtr timeObj, UInt32 *seconds)
  391. ;
  392.     IF GENERATINGCFM THEN
  393.         IMPORT_CFM_FUNCTION ConvertTimeObjectToSeconds
  394.     ENDIF
  395.  
  396. ;
  397. ; extern OSStatus ConvertLongDateTimeToTimeObject(LongDateTime *longDateTime, TimeObjectPtr convertedTimeObj)
  398. ;
  399.     IF GENERATINGCFM THEN
  400.         IMPORT_CFM_FUNCTION ConvertLongDateTimeToTimeObject
  401.     ENDIF
  402.  
  403. ;
  404. ; extern OSStatus ConvertTimeObjectToLongDateTime(ConstTimeObjectPtr timeObj, LongDateTime *longDateTime)
  405. ;
  406.     IF GENERATINGCFM THEN
  407.         IMPORT_CFM_FUNCTION ConvertTimeObjectToLongDateTime
  408.     ENDIF
  409.  
  410. ;
  411. ; *********************************************************
  412. ; *
  413. ; * TimeObjectIntervals to Nanosecond conversion functions
  414. ; *
  415. ; *********************************************************
  416. ;
  417. ;
  418. ; extern OSStatus ConvertTimeObjectIntervalToNanoseconds(ConstTimeObjectIntervalPtr source, Nanoseconds *result)
  419. ;
  420.     IF GENERATINGCFM THEN
  421.         IMPORT_CFM_FUNCTION ConvertTimeObjectIntervalToNanoseconds
  422.     ENDIF
  423.  
  424. ;
  425. ; extern OSStatus ConvertNanosecondsToTimeObjectInterval(Nanoseconds *source, TimeObjectIntervalPtr result)
  426. ;
  427.     IF GENERATINGCFM THEN
  428.         IMPORT_CFM_FUNCTION ConvertNanosecondsToTimeObjectInterval
  429.     ENDIF
  430.  
  431. ;
  432. ; *********************************************************
  433. ; *
  434. ; * Internet Time/Mail Conversion Routines
  435. ; *
  436. ; *********************************************************
  437. ;
  438. ;
  439. ; extern OSStatus ConvertTimeObjectToInternetMailTime(ConstTimeObjectPtr source, TextObject result)
  440. ;
  441.     IF GENERATINGCFM THEN
  442.         IMPORT_CFM_FUNCTION ConvertTimeObjectToInternetMailTime
  443.     ENDIF
  444.  
  445. ;
  446. ; extern OSStatus ConvertInternetMailTimeToTimeObject(TextObject source, TimeObjectPtr result)
  447. ;
  448.     IF GENERATINGCFM THEN
  449.         IMPORT_CFM_FUNCTION ConvertInternetMailTimeToTimeObject
  450.     ENDIF
  451.  
  452. ;
  453. ; extern OSStatus ConvertTimeObjectToInternetTime(ConstTimeObjectPtr source, UInt32 *result)
  454. ;
  455.     IF GENERATINGCFM THEN
  456.         IMPORT_CFM_FUNCTION ConvertTimeObjectToInternetTime
  457.     ENDIF
  458.  
  459. ;
  460. ; extern OSStatus ConvertInternetTimeToTimeObject(UInt32 internetTime, TimeObjectPtr result)
  461. ;
  462.     IF GENERATINGCFM THEN
  463.         IMPORT_CFM_FUNCTION ConvertInternetTimeToTimeObject
  464.     ENDIF
  465.  
  466. ;
  467. ; *********************************************************
  468. ; *
  469. ; * Calendar Routines
  470. ; *
  471. ; *********************************************************
  472. ;
  473. ;
  474. ; extern OSStatus GetDefaultCalendar(LocaleRef theLocale, CalendarObjectRef *theCalendar)
  475. ;
  476.     IF GENERATINGCFM THEN
  477.         IMPORT_CFM_FUNCTION GetDefaultCalendar
  478.     ENDIF
  479.  
  480. ;
  481. ; extern OSStatus GetDefaultSystemCalendar(CalendarObjectRef *theCalendar)
  482. ;
  483.     IF GENERATINGCFM THEN
  484.         IMPORT_CFM_FUNCTION GetDefaultSystemCalendar
  485.     ENDIF
  486.  
  487. ;
  488. ; *********************************************************
  489. ; *
  490. ; * Text Conversion Routines
  491. ; *
  492. ; *********************************************************
  493. ;
  494. ;
  495. ; extern OSStatus ConvertTimeObjectToDateString(ConstTimeObjectPtr timeObj, CalendarObjectRef theCalendar, TextObject textObj, TimeObjectFormatString format, FormatStringRef formatSelector, TimeObjectConversionType conversionSelector)
  496. ;
  497.     IF GENERATINGCFM THEN
  498.         IMPORT_CFM_FUNCTION ConvertTimeObjectToDateString
  499.     ENDIF
  500.  
  501. ;
  502. ; extern OSStatus ConvertTimeObjectToTimeString(ConstTimeObjectIntervalPtr timeObjectInterval, CalendarObjectRef theCalendar, TextObject textObj, TimeObjectFormatString format, FormatStringRef formatSelector, TimeObjectConversionType conversionSelector)
  503. ;
  504.     IF GENERATINGCFM THEN
  505.         IMPORT_CFM_FUNCTION ConvertTimeObjectToTimeString
  506.     ENDIF
  507.  
  508. ;
  509. ; extern OSStatus ConvertDateStringToTimeObject(TimeObjectPtr timeObj, CalendarObjectRef theCalendar, TextObject textObj, TimeObjectConversionType conversionSelector)
  510. ;
  511.     IF GENERATINGCFM THEN
  512.         IMPORT_CFM_FUNCTION ConvertDateStringToTimeObject
  513.     ENDIF
  514.  
  515. ;
  516. ; extern OSStatus ConvertTimeStringToTimeObject(TimeObjectIntervalPtr timeObjectInterval, CalendarObjectRef theCalendar, TextObject textObj, TimeObjectConversionType conversionSelector)
  517. ;
  518.     IF GENERATINGCFM THEN
  519.         IMPORT_CFM_FUNCTION ConvertTimeStringToTimeObject
  520.     ENDIF
  521.  
  522.     ENDIF
  523. ;
  524. ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  525. ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  526. ; ++                                                                                ++
  527. ; ++                                Legacy API Definitions                            ++
  528. ; ++                                                                                ++
  529. ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  530. ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  531. ;
  532.     IF FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED THEN
  533. ;
  534. ; **************************************************************************************
  535. ; *
  536. ; * The following functions are new names that work on 68k and PowerPC
  537. ; *
  538. ; **************************************************************************************
  539. ;
  540. ;
  541. ; pascal OSErr InitDateCache(DateCachePtr theCache)
  542. ;
  543.     IF ¨ GENERATINGCFM THEN
  544.         Macro
  545.         _InitDateCache
  546.             move.l              #$8204FFF8,-(sp)
  547.             dc.w                $A8B5
  548.         EndM
  549.     ELSE
  550.         IMPORT_CFM_FUNCTION InitDateCache
  551.     ENDIF
  552.  
  553. ;
  554. ; pascal StringToDateStatus StringToDate(Ptr textPtr, long textLen, DateCachePtr theCache, long *lengthUsed, LongDateRec *dateTime)
  555. ;
  556.     IF ¨ GENERATINGCFM THEN
  557.         Macro
  558.         _StringToDate
  559.             move.l              #$8214FFF6,-(sp)
  560.             dc.w                $A8B5
  561.         EndM
  562.     ELSE
  563.         IMPORT_CFM_FUNCTION StringToDate
  564.     ENDIF
  565.  
  566. ;
  567. ; pascal StringToDateStatus StringToTime(Ptr textPtr, long textLen, DateCachePtr theCache, long *lengthUsed, LongDateRec *dateTime)
  568. ;
  569.     IF ¨ GENERATINGCFM THEN
  570.         Macro
  571.         _StringToTime
  572.             move.l              #$8214FFF4,-(sp)
  573.             dc.w                $A8B5
  574.         EndM
  575.     ELSE
  576.         IMPORT_CFM_FUNCTION StringToTime
  577.     ENDIF
  578.  
  579. ;
  580. ; pascal void IUDateString(long dateTime, DateForm longFlag, Str255 result)
  581. ;
  582.     IF ¨ GENERATINGCFM THEN
  583.         Macro
  584.         _IUDateString
  585.             clr.w               -(sp)
  586.             dc.w                $A9ED
  587.         EndM
  588.     ELSE
  589.         IMPORT_CFM_FUNCTION IUDateString
  590.     ENDIF
  591.  
  592. ;
  593. ; pascal void IUTimeString(long dateTime, Boolean wantSeconds, Str255 result)
  594. ;
  595.     IF ¨ GENERATINGCFM THEN
  596.         Macro
  597.         _IUTimeString
  598.             move.w              #$0002,-(sp)
  599.             dc.w                $A9ED
  600.         EndM
  601.     ELSE
  602.         IMPORT_CFM_FUNCTION IUTimeString
  603.     ENDIF
  604.  
  605. ;
  606. ; pascal void IUDatePString(long dateTime, DateForm longFlag, Str255 result, Handle intlHandle)
  607. ;
  608.     IF ¨ GENERATINGCFM THEN
  609.         Macro
  610.         _IUDatePString
  611.             move.w              #$000E,-(sp)
  612.             dc.w                $A9ED
  613.         EndM
  614.     ELSE
  615.         IMPORT_CFM_FUNCTION IUDatePString
  616.     ENDIF
  617.  
  618. ;
  619. ; pascal void IUTimePString(long dateTime, Boolean wantSeconds, Str255 result, Handle intlHandle)
  620. ;
  621.     IF ¨ GENERATINGCFM THEN
  622.         Macro
  623.         _IUTimePString
  624.             move.w              #$0010,-(sp)
  625.             dc.w                $A9ED
  626.         EndM
  627.     ELSE
  628.         IMPORT_CFM_FUNCTION IUTimePString
  629.     ENDIF
  630.  
  631. ;
  632. ; pascal void IULDateString(LongDateTime *dateTime, DateForm longFlag, Str255 result, Handle intlHandle)
  633. ;
  634.     IF ¨ GENERATINGCFM THEN
  635.         Macro
  636.         _IULDateString
  637.             move.w              #$0014,-(sp)
  638.             dc.w                $A9ED
  639.         EndM
  640.     ELSE
  641.         IMPORT_CFM_FUNCTION IULDateString
  642.     ENDIF
  643.  
  644. ;
  645. ; pascal void IULTimeString(LongDateTime *dateTime, Boolean wantSeconds, Str255 result, Handle intlHandle)
  646. ;
  647.     IF ¨ GENERATINGCFM THEN
  648.         Macro
  649.         _IULTimeString
  650.             move.w              #$0016,-(sp)
  651.             dc.w                $A9ED
  652.         EndM
  653.     ELSE
  654.         IMPORT_CFM_FUNCTION IULTimeString
  655.     ENDIF
  656.  
  657. ;
  658. ; **************************************************************************************
  659. ; *
  660. ; * The following provide direct function prototypes for new names for 68k
  661. ; *
  662. ; **************************************************************************************
  663. ;
  664. ;
  665. ; pascal void DateString(long dateTime, DateForm longFlag, Str255 result, Handle intlHandle)
  666. ;
  667.     IF ¨ GENERATINGCFM THEN
  668.         Macro
  669.         _DateString
  670.             move.w              #$000E,-(sp)
  671.             dc.w                $A9ED
  672.         EndM
  673.     ELSE
  674.         IMPORT_CFM_FUNCTION DateString
  675.     ENDIF
  676.  
  677. ;
  678. ; pascal void TimeString(long dateTime, Boolean wantSeconds, Str255 result, Handle intlHandle)
  679. ;
  680.     IF ¨ GENERATINGCFM THEN
  681.         Macro
  682.         _TimeString
  683.             move.w              #$0010,-(sp)
  684.             dc.w                $A9ED
  685.         EndM
  686.     ELSE
  687.         IMPORT_CFM_FUNCTION TimeString
  688.     ENDIF
  689.  
  690. ;
  691. ; pascal void LongDateString(LongDateTime *dateTime, DateForm longFlag, Str255 result, Handle intlHandle)
  692. ;
  693.     IF ¨ GENERATINGCFM THEN
  694.         Macro
  695.         _LongDateString
  696.             move.w              #$0014,-(sp)
  697.             dc.w                $A9ED
  698.         EndM
  699.     ELSE
  700.         IMPORT_CFM_FUNCTION LongDateString
  701.     ENDIF
  702.  
  703. ;
  704. ; pascal void LongTimeString(LongDateTime *dateTime, Boolean wantSeconds, Str255 result, Handle intlHandle)
  705. ;
  706.     IF ¨ GENERATINGCFM THEN
  707.         Macro
  708.         _LongTimeString
  709.             move.w              #$0016,-(sp)
  710.             dc.w                $A9ED
  711.         EndM
  712.     ELSE
  713.         IMPORT_CFM_FUNCTION LongTimeString
  714.     ENDIF
  715.  
  716.     ENDIF
  717.     ENDIF ; __TIMEOBJECTS__ 
  718.  
  719.